﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="Modify.aspx.cs" Inherits="IMIS_ERP.Web.Order_Info.WebForm1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../Styles/order.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="body_top">
        <img src="../images/tab_t_l.gif" alt="" />
        <span class="f1">您当前的位置</span>：【订单管理】-【修改订单】
    </div>
    <div class="body_main">
        <div class="line1">
            <div class="lineLeft">
                订单编号：</div>
            <div class="lineRight">
                <asp:Label ID="lbloiID" runat="server"></asp:Label>
                | 添加时间：<asp:Label ID="lbloiTime" runat="server"></asp:Label>
            </div>
        </div>
        <div class="line2">
            <div class="lineLeft">
                客户姓名：</div>
            <div class="lineRight">
                <asp:TextBox ID="txtoiCusName" runat="server"></asp:TextBox>
            </div>
        </div>
        <div class="line1">
            <div class="lineLeft">
                客户地址：</div>
            <div class="lineRight">
                <asp:TextBox ID="txtoiCusAddress" runat="server" Width="350px"></asp:TextBox>
            </div>
        </div>
        <div class="line2">
            <div class="lineLeft">
                客户联系方式：</div>
            <div class="lineRight">
                <asp:TextBox ID="txtOiCusContact" runat="server" Width="350px"></asp:TextBox>
            </div>
        </div>
        <div class="line1">
            <div class="lineLeft">
                交货日期：</div>
            <div class="lineRight">
                <asp:TextBox ID="txtoIDelivTime" runat="server" Width="150px"></asp:TextBox><asp:CalendarExtender
                    ID="cde" Format="yyyy-MM-dd" TargetControlID="txtoIDelivTime" runat="server">
                </asp:CalendarExtender>
                | 预付定金：<asp:TextBox ID="txtoiAddvance" runat="server" Width="150px"></asp:TextBox>
                元
                <asp:RegularExpressionValidator ID="rfvtxthsFee" runat="server" ErrorMessage="请输入正确的金额"
                    ValidationExpression="^\d*(\.\d{1,2})?$" ControlToValidate="txtoiAddvance" 
                    ForeColor="Red" Display="Dynamic" ValidationGroup="create"></asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="rfvtxtoIDelivTime" runat="server" ValidationGroup="create" ErrorMessage="交货日期不能为空" ForeColor="Red" ControlToValidate="txtoIDelivTime"></asp:RequiredFieldValidator>
            </div>
        </div>
        <div class="line2">
            <div class="lineLeft">
                结算金额：</div>
            <div class="lineRight">
                <asp:TextBox ID="txtoiContractFee" runat="server" Width="150px" Enabled="false"></asp:TextBox>
                | 销售金额：<asp:TextBox ID="txtoiSettleFee" runat="server" Width="150px" Enabled="false"></asp:TextBox>
                元
            </div>
        </div>
        <div class="line1">
            <div class="lineLeft">
                测量人：</div>
            <div class="lineRight">
                <asp:TextBox ID="txtoiMeasure" runat="server" Width="150px"></asp:TextBox>
                | 加工中心：<asp:TextBox ID="txtoiFiID" runat="server" Width="150px" Enabled="false"></asp:TextBox>
            </div>
        </div>
        <div class="line2">
            <div class="lineLeft">
                测量附件：</div>
            <div class="lineRight">
                <asp:FileUpload ID="fuloiAccessary" runat="server" /><asp:HyperLink ID="hploiAccessary" runat="server">点此下载</asp:HyperLink><asp:Label ID="lbloiAccessary"
                    runat="server" Visible="false"></asp:Label>
            </div>
        </div>
        <div class="line1">
            <div class="lineLeft">
                生产任务单：</div>
            <div class="lineRight">
                <asp:CheckBox ID="chkoiIsToTask" runat="server" Enabled="false" />
                | 生成时间：<asp:Label ID="lbloiCrtTime" runat="server"></asp:Label>
            </div>
        </div>
        <div class="line2">
            <div class="lineLeft">
                提交给加工中心：</div>
            <div class="lineRight">
                <asp:CheckBox ID="ckboiIsSendToF" runat="server" Enabled="false" />
                | 提交时间：<asp:Label ID="lbloiSendToFTime" runat="server"></asp:Label>
            </div>
        </div>
        <div class="line1">
            <div class="lineLeft">
                是否打回：</div>
            <div class="lineRight">
                <asp:CheckBox ID="ckboiIsBackToS" runat="server" Enabled="false" />
                | 打回时间：<asp:Label ID="lbloiBackToSTime" runat="server"></asp:Label>
                | 打回原因：<asp:Label ID="lbloiBackResult" runat="server"></asp:Label>
            </div>
        </div>
        <div id="bottom">
            <asp:Label ID="lblMessage" runat="server" CssClass="msg"></asp:Label><br />
            <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" CssClass="btn" ValidationGroup="create">
            </asp:Button>
            <input id="btnCancel" type="button" value="返回" onclick="Cancel();" class="btn" />
            <asp:Button ID="btnCreate" runat="server" Text="提交给加工中心" OnClick="btnCreate_Click"
                Height="25px" ValidationGroup="create"></asp:Button>
        </div>
        <hr />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div class="line2">
                    <div class="lineLeft">
                        产品编号：</div>
                    <div class="lineRight">
                        <asp:DropDownList ID="ddlopPiID" runat="server" AutoPostBack="True" Width="150px"
                            OnSelectedIndexChanged="ddlopPiID_SelectedIndexChanged">
                        </asp:DropDownList>
                        | 产品名称：<asp:TextBox ID="txtopPiName" runat="server" Enabled="false"></asp:TextBox>
                    </div>
                </div>
                <div class="line1">
                    <div class="lineLeft">
                        壁厚：</div>
                    <div class="lineRight">
                        <asp:DropDownList ID="ddlopWallThick" runat="server" Width="150px" AutoPostBack="True"
                            OnSelectedIndexChanged="ddlopWallThick_SelectedIndexChanged">
                        </asp:DropDownList>
                        | 产品型号：<asp:TextBox ID="txtopPcID" runat="server" Enabled="false"></asp:TextBox><asp:RequiredFieldValidator
                            ID="rfvtxtopPcID" runat="server" ErrorMessage="产品型号不能为空" ControlToValidate="txtopPcID" ValidationGroup="Add" ForeColor="Red"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="line1">
                    <div class="lineLeft">
                        是否加锁：</div>
                    <div class="lineRight">
                        <asp:DropDownList ID="ddlopLock" runat="server" Width="50px" AutoPostBack="True"
                            OnSelectedIndexChanged="ddlopLock_SelectedIndexChanged">
                            <asp:ListItem Value="0">否</asp:ListItem>
                            <asp:ListItem Value="0">是</asp:ListItem>
                        </asp:DropDownList>
                        价格：<asp:TextBox ID="txtopLock" Width="56px" runat="server" Enabled="false">0</asp:TextBox>
                        | 加花单价：<asp:TextBox ID="txtopFigure" Width="56px" runat="server" Enabled="false">0</asp:TextBox>
                        数量：<asp:TextBox ID="txtopFigureNum" Width="40px" runat="server" AutoPostBack="True"
                            OnTextChanged="txtopFigureNum_TextChanged">0</asp:TextBox>
                        总价：<asp:TextBox ID="txtopFigureSum" Width="56px" runat="server" Enabled="false">0</asp:TextBox>
                        <asp:RegularExpressionValidator ID="rfvtxtopFigureNum" runat="server" ErrorMessage="请输入正确的数量"
                            ValidationExpression="^\d*(\.\d{1,2})?$" ControlToValidate="txtopFigureNum" ValidationGroup="Add"
                            Display="Dynamic"></asp:RegularExpressionValidator>
                    </div>
                </div>
                <div class="line2">
                    <div class="lineLeft">
                        单位面积价格：</div>
                    <div class="lineRight">
                        结算价格：<asp:TextBox ID="txtopPrice1" runat="server" Width="82px" Enabled="false"></asp:TextBox>
                        | 销售价格：<asp:TextBox ID="txtopPrice2" runat="server" Width="80px" Enabled="false"></asp:TextBox>
                    </div>
                </div>
                <div class="line1">
                    <div class="lineLeft">
                        单位面积加价：</div>
                    <div class="lineRight">
                        <asp:TextBox ID="txtopMarkup" runat="server" Width="50px">0.0</asp:TextBox>(比率，0.0为不变)
                        | 折扣：<asp:TextBox ID="txtopDisCount" runat="server" Width="50px" Enabled="false">1.0</asp:TextBox>(比率，1.0为原价)
                        | 其他加价：<asp:TextBox ID="txtopMarkupOther" runat="server" Width="80px">0</asp:TextBox>(正数，加价后请在备注说明)<asp:RangeValidator
                            ID="RangeValidator1" runat="server" ErrorMessage="其他加价只能为正数" MinimumValue="0"
                            MaximumValue="100000000" ControlToValidate="txtopMarkupOther" ValidationGroup="Add" Type="Double" ForeColor="Red"></asp:RangeValidator>
                            <asp:RangeValidator
                            ID="RangeValidator2" runat="server" ErrorMessage="单位面积加价只能为正数" MinimumValue="0"
                            MaximumValue="100000000" ControlToValidate="txtopMarkup" ValidationGroup="Add" Type="Double" ForeColor="Red"></asp:RangeValidator>
                    </div>
                </div>
                <div class="line2">
                    <div class="lineLeft">
                        面积：</div>
                    <div class="lineRight">
                        <asp:TextBox ID="txtopArea" runat="server" Width="80px"></asp:TextBox>
                        平方米/延米 | 数量：<asp:TextBox ID="txtopNum" runat="server" Width="80px">1</asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvtxtopArea" runat="server" ErrorMessage="面积不能为空"
                            ControlToValidate="txtopArea" ValidationGroup="Add" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="revtxtopArea" runat="server" ErrorMessage="请输入正确的面积"
                            ValidationExpression="^\d*(\.\d{1,4})?$" ControlToValidate="txtopArea" ValidationGroup="Add"
                            Display="Dynamic" ForeColor="Red"></asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="rfvtxtopNum" runat="server" ErrorMessage="数量不能为空"
                            ControlToValidate="txtopNum" ValidationGroup="Add" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="rev" runat="server" ErrorMessage="请输入正确的数量" ValidationExpression="\d+"
                            ControlToValidate="txtopNum" ValidationGroup="Add" Display="Dynamic" ForeColor="Red"></asp:RegularExpressionValidator>
                    </div>
                </div>
                <div class="line1">
                    <div class="lineLeft">
                        备注：</div>
                    <div class="lineRight">
                        <asp:TextBox ID="txtopRemark" runat="server" Width="350px"></asp:TextBox>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <div class="bottom">
            <asp:Label ID="lblMessage2" runat="server" CssClass="msg"></asp:Label><br />
            <asp:Button ID="btnAdd" runat="server" Text="添加" OnClick="btnAdd_Click" CssClass="btn"
                ValidationGroup="Add"></asp:Button>
        </div>
        <asp:GridView ID="GV" CssClass="GV" runat="server" CellPadding="3" AutoGenerateColumns="False"
            DataKeyNames="opID" OnRowCreated="GV_RowCreated" OnRowDeleting="GV_RowDeleting">
            <Columns>
                <asp:BoundField DataField="opPiName" HeaderText="产品名称" />
                <asp:BoundField DataField="opPcID" HeaderText="产品型号" />
                <asp:BoundField DataField="opArea" HeaderText="面积" />
                <asp:BoundField DataField="opPrice1" HeaderText="结算单价" />
                <asp:BoundField DataField="opPrice2" HeaderText="销售单价" />
                <asp:BoundField DataField="opFigureSum" HeaderText="加花价格" />
                <asp:BoundField DataField="opLock" HeaderText="加锁价格" />
                <asp:BoundField DataField="opMarkup" HeaderText="加价" />
                <asp:BoundField DataField="opDisCount" HeaderText="折扣" />
                <asp:BoundField DataField="opMarkupOther" HeaderText="其他加价" />
                <asp:BoundField DataField="opNum" HeaderText="数量" />
                <asp:BoundField DataField="opFee1" HeaderText="结算金额" />
                <asp:BoundField DataField="opFee2" HeaderText="销售金额" />
                <asp:BoundField DataField="opRemark" HeaderText="备注" />
                <asp:TemplateField HeaderText="操作" ItemStyle-CssClass="operate">
                    <ItemTemplate>
                        &nbsp; &nbsp;<img src="../images/ico_delete.gif" /><asp:LinkButton ID="LinkButton1"
                            runat="server" CausesValidation="False" CommandName="Delete" OnClientClick="return confirm('确定删除吗？')"
                            Text="删除"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <RowStyle CssClass="gv_row" />
            <SelectedRowStyle CssClass="gv_sel" />
            <PagerStyle CssClass="gv_pag" />
            <HeaderStyle CssClass="gv_hea" />
            <AlternatingRowStyle CssClass="gv_alt" />
            <FooterStyle CssClass="gv_foo" />
        </asp:GridView>
    </div>
</asp:Content>
